﻿using Dapper;
using Summer.IService;
using Summer.IService.v1;
using Summer.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace Summer.Service.v1
{
    public partial class usersService:IusersService
    {
        private readonly IDBFactory _dbFactory;
        public usersService(IDBFactory dbFactory)
        {
            _dbFactory = dbFactory;
        }

        public users GetUser(string userId)
        {
            using (var conn = _dbFactory.Create())
            {
                return conn.QuerySingle<users>("select * from Users where userId=" + userId);
            }
        }
    }
}
